package com.wbu.estatemanagement.service.impl;

import com.wbu.estatemanagement.dao.AdminMapper;
import com.wbu.estatemanagement.domain.Admin;
import com.wbu.estatemanagement.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AdminServiceImpl implements AdminService {

    @Autowired
    AdminMapper adminMapper;

    @Override
    public Admin findByName(Admin admin) {
         admin=adminMapper.selectOne(admin);
         return admin;
    }

    @Override
    public Admin findAdmin(Integer adminId) {
        return adminMapper.selectByPrimaryKey(adminId);
    }

}
